Don't pad beyond maximal width
authorJonas Bernoulli <jonas@bernoul.li>
Thu, 4 Aug 2022 12:05:08 +0000 (14:05 +0200)
committerJonas Bernoulli <jonas@bernoul.li>
Thu, 4 Aug 2022 12:05:08 +0000 (14:05 +0200)
commit254d6fdc2b3c993b599fc3ca29cda14bc6c0a5fb
treefbefafd9ecc03a447698985fe9f45b0dd3aae375
parent16c992f80fa6394b4dc5166e6c14129ec4946e12
Don't pad beyond maximal width

The old implementation behaved as if the "description" is the only
information that is being displayed, however in actuality the
available width has to be shared with the key (and the separator
between the two).

Failing to take that into account meant that every binding whose
description isn't *by itself* wider than the width available to
display all the information got excessive padding, which later has to
be removed during truncation again (resulting in misleading ellipses).
which-key.el